package com.designpattern.structure.Decorator;

/**
 * @author Administration
 * @date 2021/10/18 - 14:00 - 星期一
 * @project 结构型模式中的装饰者模式  具体装饰（ConcreteDecorator）角色
 * @package com.designpattern.structure.Decorator
 * @by 晨
 */
public class Bacon extends Garnish{
    public Bacon(FastFood fastFood) {

        super(fastFood,2,"培根");
    }

    @Override
    public float cost() {
        return getPrice() + getFastFood().getPrice();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
